package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TPowerBatteryInfoMapper;
import com.ruoyi.system.domain.TPowerBatteryInfo;
import com.ruoyi.system.service.ITPowerBatteryInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 动力电池信息Service业务层处理
 * 
 * @author wuliuzhen
 * @date 2025-10-01
 */
@Service
public class TPowerBatteryInfoServiceImpl implements ITPowerBatteryInfoService 
{
    @Autowired
    private TPowerBatteryInfoMapper tPowerBatteryInfoMapper;

    /**
     * 查询动力电池信息
     * 
     * @param id 动力电池信息主键
     * @return 动力电池信息
     */
    @Override
    public TPowerBatteryInfo selectTPowerBatteryInfoById(Long id)
    {
        return tPowerBatteryInfoMapper.selectTPowerBatteryInfoById(id);
    }

    /**
     * 查询动力电池信息列表
     * 
     * @param tPowerBatteryInfo 动力电池信息
     * @return 动力电池信息
     */
    @Override
    public List<TPowerBatteryInfo> selectTPowerBatteryInfoList(TPowerBatteryInfo tPowerBatteryInfo)
    {
        return tPowerBatteryInfoMapper.selectTPowerBatteryInfoList(tPowerBatteryInfo);
    }

    /**
     * 新增动力电池信息
     * 
     * @param tPowerBatteryInfo 动力电池信息
     * @return 结果
     */
    @Override
    public int insertTPowerBatteryInfo(TPowerBatteryInfo tPowerBatteryInfo)
    {
        return tPowerBatteryInfoMapper.insertTPowerBatteryInfo(tPowerBatteryInfo);
    }

    /**
     * 修改动力电池信息
     * 
     * @param tPowerBatteryInfo 动力电池信息
     * @return 结果
     */
    @Override
    public int updateTPowerBatteryInfo(TPowerBatteryInfo tPowerBatteryInfo)
    {
        return tPowerBatteryInfoMapper.updateTPowerBatteryInfo(tPowerBatteryInfo);
    }

    /**
     * 批量删除动力电池信息
     * 
     * @param ids 需要删除的动力电池信息主键
     * @return 结果
     */
    @Override
    public int deleteTPowerBatteryInfoByIds(String ids)
    {
        return tPowerBatteryInfoMapper.deleteTPowerBatteryInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除动力电池信息信息
     * 
     * @param id 动力电池信息主键
     * @return 结果
     */
    @Override
    public int deleteTPowerBatteryInfoById(Long id)
    {
        return tPowerBatteryInfoMapper.deleteTPowerBatteryInfoById(id);
    }
}
